//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CRenderTargetSet9.h>
///	@path	~/src/graphics/dx9/
///	@date	2009/01/24
///	@desc	.

#pragma once

#include "xeres.h"

#include "graphics/IRenderTargetSet.h"
#include "graphics/dx9/CDevice9.h"

namespace xeres {

	/*! 
		\class	CRenderTargetSet9
		\brief
	*/
	class CRenderTargetSet9 : public IRenderTargetSet
	{
	public:

		/// \ctor
		CRenderTargetSet9( int width , int height );

		/// \dtor
		virtual ~CRenderTargetSet9( void );

		DECL_IOBJECT_CLASS( CRenderTargetSet9 , IRenderTargetSet );

	public:

		/// \name Render Target Set Interface
		//@{

		/// \impl
		virtual Pair<int> GetSize( void );

		/// \impl
		virtual uint GetCount( void );

		/// \impl
		virtual void BindTarget( uint index , RefWeak<IRenderTarget> target );

		/// \impl
		virtual void UnbindAll( void );

		/// \impl
		virtual void ApplyTarget( RenderContext& rc );

		//@}

	private:

		//@ data
		Ref<IRenderTarget>	m_slots[8];

		// width & height of render target
		int					m_width , m_height;
	};

} // namespace xeres
